package edu.sctu.practice.class02.hujie.my_practice.day20151111;

import java.util.InputMismatchException;

/**
 * Created by user14 on 2015/11/11.
 */
public class ScannerTest {
    public static void main(String[] args) {


        java.util.Scanner input = new java.util.Scanner(System.in);
        try

        {
            System.out.print("请输入第一个数");
            double one=input.nextDouble();
            System.out.println("请输入第二个数");
            double two = input.nextDouble();
            System.out.println("两数相除结果为：" + one / two);
        } catch (
                InputMismatchException e
                )

        {
            System.out.println("你应该输入数");
        } catch (
                ArithmeticException e
                )

        {
            System.out.println("除数不能为0");
        }
        System.out.println("程序结束啦啦啦");
    }
}
